package org.zcl.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.zcl.feign.fallback.UserServiceFeignClientFallbackFactory;

/**
 * .
 *
 * @Author Chenglin Zhu
 * @Date 2022/1/23 7:27 下午
 */
@FeignClient(name = "user-service",url = "http://127.0.0.1:18080", fallbackFactory = UserServiceFeignClientFallbackFactory.class)
public interface UserServiceFeignClient {

    @GetMapping("/user/get")
    String getUser(@RequestParam("id") Integer id);
}
